<!DOCTYPE html>
<html lang="en">

{include file='index/header'}

<body id="order-detail" class="flexv">
<div id="common-header" class="flex">
    <a href="javascript:history.back()" class="cBtn back"><i class="iconfont icon-back"></i></a>
    <h1>订单详情</h1>
</div>
<div class="flexitemv scroll main">
    <div class="flex centerv address">
        <i class="iconfont icon-address"></i>
        <div class="flexitemv content">
            <p class="flex"><span class="uname">{$res.i_uname}</span><span class="tel">{$res.i_phone}</span></p>
            <span class="intro">{$res.i_detail}</span>
        </div>
    </div>
    <div class="tips">
        <div class="flex centerv item">
            <p>订单号</p>
            <span>{$res.i_number}</span>
        </div>
        <div class="flex centerv item">
            <p>订单状态</p>
            <span>{eq name='res.i_status' value='1'}已付款{else /}待付款{/eq}</span>
        </div>
    </div>
    <div class="flex goods-item">
        <a href="" class="flexitem">
            <div class="img"><img src="{:config('image_path')}{$res.product.p_photo}" alt=""></div>
            <div class="flexitemv content">
                <h2>{$res.product.p_name}</h2>
                <p>{eq name='res.i_type' value='1'}免费领取{else /}常规套装{/eq}{eq name='res.i_type' value='1'}{neq name='res.spec' value=''}  /  {$res.spec.s_name} ¥{$res.spec.s_price}{/neq}  /  {eq name='res.i_packing' value='1'}正常包装 ¥{:config('packing')}{else /}不包装{/eq}  /  邮费 ¥15{/eq}</p>
                <span>¥ {:round($res.product.p_price,2)}</span>
            </div>
        </a>
    </div>
    <div class="details">
        <div class="flex centerv item">
            <p>商品价格</p>
            <span>¥ {:round($res.product.p_price,2)}</span>
        </div>
        {eq name='res.i_type' value='1'}
            <div class="flex centerv item">
                <p>包装费用</p>
                <span>{eq name='res.i_packing' value='1'}¥ {:config('packing')}.00{else /}¥ 0.00{/eq}</span>
            </div>
            <div class="flex centerv item">
                <p>配送费用</p>
                <span>{eq name='res.i_postarea' value='0'}包邮{else /}¥ 10.00 / 偏远地区{/eq}</span>
            </div>
            {neq name='res.i_spec' value=''}
                <div class="flex centerv item">
                    <p>商品规格</p>
                    <span>{$res.spec.s_name} / ¥ {$res.spec.s_price}</span>
                </div>
            {/neq}
        {/eq}
        {neq name='res.i_uintegral' value='0'}
        <div class="flex centerv item">
            <p>使用积分</p>
            <span>{$res.i_uintegral}</span>
        </div>
        {/neq}
        <div class="flex centerv item special">
            <p>合计费用：<strong>¥ {:round($res.i_totprice,2)}</strong></p>
        </div>
    </div>
    {eq name='res.i_status' value='0'}
    <div class="flex pay">
        <a href="javascript:;" data-url="{:url('Indent/payorder',['indent_id'=>$res.id])}" class="flexitem centerv pay">
            <i class="iconfont icon-mwpay"></i>
            <div class="flexitemv text">
                <p>微信支付</p>
                <span>使用微信完成支付</span>
            </div>
            <i class="iconfont icon-go"></i>
        </a>
    </div>
    {/eq}
</div>
</body>
{js href="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"}
{js href="__ROOT__/public/static/js/functions.js"}
<script>
    $('.pay').click(function () {
        var url = $(this).attr('data-url');
        console.log(url);
        $.get(url,function (ret) {
            window.location.href = ret.url;
        })
    })
</script>
{include file='index/footer'}
</html>